Skip to content

test(asset): add coverage for AssetCard component - #338

Merged
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
joyyakubu41:feature/175-assetcard-tests
Aug 31, 2026
Merged

test(asset): add coverage for AssetCard component#338
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
joyyakubu41:feature/175-assetcard-tests

Conversation

@joyyakubu41

Copy link
Copy Markdown

Summary

Adds a new test file for components/asset/AssetCard.tsx using React Testing Library, following the conventions in components/ui/ and components/asset/.

Tests added (AssetCard.test.tsx)

  • Renders asset name
  • Renders asset type badge (real_estate, invoice, commodity)
  • Renders formatted valuation (compact USD)
  • Links to the correct asset detail route (/asset/<id>)
  • Shows Inactive chip when asset.active is false
  • Hides Inactive chip when asset is active
  • Shows holder count when provided
  • Shows supply string when provided
  • Shows when neither holders nor supply is given
  • Falls back to 'Unnamed asset' when name is empty

Validation

Queries by role and accessible name; mocks next/link as a plain <a> following the pattern in existing tests. No production code modified.

Closes #175

Assert name, type badge, valuation, detail-page link, inactive chip,
holders/supply display, and unnamed-asset fallback.

Closes RWA-ToolKit#175
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@joyyakubu41 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@valoryyaa-byte
valoryyaa-byte merged commit ba36e54 into RWA-ToolKit:main Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add coverage for AssetCard

3 participants